package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;
import org.jsola.core.validator.Const;
import org.jsola.hr.constant.EmpInfoRequireType;

import javax.validation.constraints.NotNull;

import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;
import static org.jsola.hr.example.EmpContactsRequireExample.E_BIRTHDAY;
import static org.jsola.hr.example.EmpContactsRequireExample.E_COMPANY;
import static org.jsola.hr.example.EmpContactsRequireExample.E_NAME;
import static org.jsola.hr.example.EmpContactsRequireExample.E_PHONE;
import static org.jsola.hr.example.EmpContactsRequireExample.E_POLITICAL_STATUS;
import static org.jsola.hr.example.EmpContactsRequireExample.E_POSITION;
import static org.jsola.hr.example.EmpContactsRequireExample.E_RELATION;
import static org.jsola.hr.example.EmpContactsRequireExample.M_BIRTHDAY_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpContactsRequireExample.M_COMPANY_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpContactsRequireExample.M_NAME_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpContactsRequireExample.M_PHONE_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpContactsRequireExample.M_POLITICAL_STATUS_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpContactsRequireExample.M_POSITION_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpContactsRequireExample.M_RELATION_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpContactsRequireExample.N_BIRTHDAY;
import static org.jsola.hr.example.EmpContactsRequireExample.N_COMPANY;
import static org.jsola.hr.example.EmpContactsRequireExample.N_NAME;
import static org.jsola.hr.example.EmpContactsRequireExample.N_PHONE;
import static org.jsola.hr.example.EmpContactsRequireExample.N_POLITICAL_STATUS;
import static org.jsola.hr.example.EmpContactsRequireExample.N_POSITION;
import static org.jsola.hr.example.EmpContactsRequireExample.N_RELATION;

/**
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【公司员工联系人所需信息】的参数")
@Data
public class EmpContactsRequireUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private String id;

    @ApiModelProperty(notes = N_NAME, example = E_NAME, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_NAME_ENUM_NOT_MATCH)
    private Integer name;

    @ApiModelProperty(notes = N_RELATION, example = E_RELATION, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_RELATION_ENUM_NOT_MATCH)
    private Integer relation;

    @ApiModelProperty(notes = N_BIRTHDAY, example = E_BIRTHDAY, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_BIRTHDAY_ENUM_NOT_MATCH)
    private Integer birthday;

    @ApiModelProperty(notes = N_PHONE, example = E_PHONE, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_PHONE_ENUM_NOT_MATCH)
    private Integer phone;

    @ApiModelProperty(notes = N_COMPANY, example = E_COMPANY, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_COMPANY_ENUM_NOT_MATCH)
    private Integer company;

    @ApiModelProperty(notes = N_POSITION, example = E_POSITION, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_POSITION_ENUM_NOT_MATCH)
    private Integer position;

    @ApiModelProperty(notes = N_POLITICAL_STATUS, example = E_POLITICAL_STATUS, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_POLITICAL_STATUS_ENUM_NOT_MATCH)
    private Integer politicalStatus;


}

